#coding=utf-8

import socket

def main():
    # 1. create socket
    udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    # 2. bind a local information
    localaddr = ("", 7788)
    udp_socket.bind(localaddr)
    # 3. receive data
    recv_data = udp_socket.recvfrom(1024)
    # 4. print receive data
    print(recv_data)
    # 5. close scoket
    udp_socket.close()



if __name__ == "__main__":
    main()